package 求和;

import java.util.Scanner;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
    static int N = 15, n, m;
    static int[] ways = new int[N];
    static boolean[] st = new boolean[N];

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        n = in.nextInt();
        m = in.nextInt();
        dfs(0, 0, 1);
    }

    private static void dfs(int sum, int u, int start) {
        if (sum > m) {
            return;
        }
        if (sum == m) {
            for (int i = 0; i < u; i++) {
                System.out.print(ways[i] + " ");
            }
            System.out.println();
            return;
        }
        for (int i = start; i <= n; i++) {
            if (!st[i]) {
                st[i] = true;
                ways[u] = i;
                dfs(sum + i, u + 1, i + 1);
                st[i] = false;
                ways[u] = 0;
            }
        }
    }
}
